<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateServerEngineTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('server_engine', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('user_id')->nullable()->comment('用户id');
            $table->string('name',50)->nullable()->comment('引擎名称');
            $table->string('code',50)->nullable()->comment('引擎代码');
            $table->string('key',50)->nullable()->comment('密钥');
            $table->string('info')->nullable()->comment('介绍');
            $table->string('qq',30)->nullable()->comment('服务QQ');
            $table->integer('price')->default(0)->comment('每月价格，积分');
            $table->tinyInteger('status')->default(-1)->comment('状态：-1待审核，-2审核不通过，1审核通过');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('server_engine');
    }
}
